﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="QLNghiPhep.aspx.cs" Inherits="ChamCong.LanhDao.QLNghiPhep" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        div.childMenu
        {
            padding-bottom: 10px;
        }
        
        div.childMenu ul
        {
            list-style: none;
            margin: 0px;
            padding: 0px;
            width: auto;
        }
        
        div.childMenu ul li
        {
            padding-right: 5px;
        }
        
        div.childMenu ul li a
        {
            background-color: #D4D4D4;
            color: #525252;
            display: block;
            line-height: 1.35em;
            padding: 4px 10px;
            text-decoration: none;
            white-space: nowrap;
        }
        
        div.childMenu ul li a:hover
        {
            background-color: #3399FF;
            color: #FFF;
            text-decoration: none;
        }
        
        div.childMenu ul li a:active
        {
            background-color: #3399FF;
            color: #cfdbe6;
            text-decoration: none;
        }
        
        div.childMenu ul li a:visited
        {
            font-weight: bold;
        }
        div.childMenu ul li a.current
        {
            background-color: #3399FF;
            color: #FFF;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div style="width: 850px;">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" CssClass="childMenu"
                SkipLinkText="">
                <Items>
                    <asp:MenuItem Text="Xem tất cả" Value="" NavigateUrl="~/LanhDao/QLNghiPhep.aspx?ThaoTac=TatCa">
                    </asp:MenuItem>
                    <asp:MenuItem Text="DS phép chờ duyệt" Value="" NavigateUrl="~/LanhDao/QLNghiPhep.aspx?ThaoTac=DSChoDuyet">
                    </asp:MenuItem>
                    <asp:MenuItem Text="DS phép đã duyệt" Value="" NavigateUrl="~/LanhDao/QLNghiPhep.aspx?ThaoTac=DSDaDuyet">
                    </asp:MenuItem>
                    <asp:MenuItem Text="DS phép không duyệt" Value="" NavigateUrl="~/LanhDao/QLNghiPhep.aspx?ThaoTac=DSKhongDuyet">
                    </asp:MenuItem>
                </Items>
            </asp:Menu>
        </div>
        <asp:Panel ID="Panel1" runat="server">
            <div style="float: left; width: 550px; padding-right: 5px;">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="grvDSDonXinPhep" runat="server" CellPadding="4" Width="100%" ForeColor="#333333"
                            GridLines="None" AutoGenerateColumns="False" EmptyDataText="Hiện thời không có dữ liệu."
                            AllowPaging="True" PageSize="8" OnPageIndexChanging="grvDSDonXinPhep_PageIndexChanging">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:BoundField DataField="MaPhep" HeaderText="Mã ĐXP" />
                                <asp:BoundField DataField="MaNV" HeaderText="Mã NV" />
                                <asp:BoundField DataField="HoTen" HeaderText="Họ Tên" />
                                <%--                    <asp:BoundField DataField="MaPB" HeaderText="Phòng ban" />--%>
                                <asp:TemplateField HeaderText="Từ Ngày">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTuNgay" runat="server" Text='<%#AutoConvert(Eval("TuNgay"))%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Đến Ngày">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTuNgay" runat="server" Text='<%#AutoConvert(Eval("DenNgay"))%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--<asp:BoundField DataField="TuNgay" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Từ ngày" />--%>
                                <%--<asp:BoundField DataField="DenNgay" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Đến ngày" />--%>
                                <asp:BoundField DataField="SoBuoiNghi" HeaderText="Số ngày nghỉ"></asp:BoundField>
                                <asp:TemplateField HeaderText="Trạng thái">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTrangThaiDuyet" runat="server" Text='<%# ktDuyet(Eval("TrangThaiDuyet")) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Xem">
                                    <ItemTemplate>
                                        <a href='QLNghiPhep.aspx?ThaoTac=<%# LayLoaiDS() %>&MaPhep=<%# Eval("MaPhep") %>'>Xem</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--<asp:BoundField DataField="TrangThaiDuyet" HeaderText="Trạng thái duyệt" />--%>
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#0072c6" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#0072c6" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" CssClass="pager" />
                            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        <div style="line-height: 0px; width: 100%;">
                            <asp:Image ID="Image1" ImageUrl="~/images/box-shadow.png" runat="server" Visible="False" /></div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </asp:Panel>
        <div style="float: left; width: 295px;">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <sbc:sbcMsgBox ID="sbcMsgBox1" runat="server" UseJQuery="True" />
                    <asp:DetailsView ID="dtvChiTietDXP" runat="server" Height="50px" Width="100%" Visible="False"
                        AutoGenerateRows="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
                        CellPadding="2" ForeColor="Black" GridLines="None">
                        <AlternatingRowStyle BackColor="PaleGoldenrod" />
                        <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                        <Fields>
                            <asp:BoundField DataField="MaPhep" HeaderText="Mã phép" />
                            <asp:TemplateField HeaderText="Tên nhân viên">
                                <ItemTemplate>
                                    <asp:Label ID="lblTenNV" runat="server" Text='<%# ktTenNV(Eval("MaNV")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Loại phép">
                                <ItemTemplate>
                                    <asp:Label ID="lblLoaiPhep" runat="server" Text='<%# ktLoaiPhep(Eval("MaLoaiPhep")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="MaNV" HeaderText="Phòng ban" />
                            <asp:TemplateField HeaderText="Từ">
                                <ItemTemplate>
                                    <asp:Label ID="lblTuNgay" runat="server" Text='<%# Eval("TuNgay","{0:dd/MM/yyyy}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Đến">
                                <ItemTemplate>
                                    <asp:Label ID="lblDenNgay" runat="server" Text='<%# Eval("DenNgay","{0:dd/MM/yyyy}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Thông tin nghỉ">
                                <ItemTemplate>
                                    <asp:Label ID="lblLoaiBuoi" runat="server" Text='<%# ktThongTinBuoi(Eval("LoaiBuoi")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="SoNgayNghi" HeaderText="Số ngày nghỉ" />
                            <asp:BoundField DataField="SoNgayNghiCoLuong" HeaderText="Số ngày nghỉ có lương" />
                            <asp:BoundField DataField="LyDo" HeaderText="Lý do" />
                            <asp:BoundField DataField="NgayTao" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Ngày nộp" />
                            <asp:TemplateField HeaderText="Trạng thái">
                                <ItemTemplate>
                                    <asp:Label ID="lblTrangThaiDuyet" runat="server" Text='<%# ktDuyet(Eval("TrangThaiDuyet")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ChuThich" HeaderText="Phản hồi" />
                        </Fields>
                        <FooterStyle BackColor="Tan" />
                        <HeaderStyle BackColor="Tan" Font-Bold="True" />
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                    </asp:DetailsView>
                    <div style="line-height: 0px; width: 100%;">
                        <asp:Image ID="Image2" ImageUrl="~/images/box-shadow.png" runat="server" Visible="False" /></div>
                    <asp:Label ID="lblChuThich" runat="server" Text="Phản hồi" ForeColor="#FF6600" Font-Italic="True"
                        Font-Bold="True" Visible="False"></asp:Label>
                    <br />
                    <asp:TextBox ID="tbxChuThich" runat="server" Height="71px" TextMode="MultiLine" Width="300px"
                        Visible="False" Enabled="False"></asp:TextBox>
                    <div>
                        <asp:Button class="button" ID="btnDuyet" runat="server" Text="Duyệt" OnClick="btnDuyet_Click"
                            Visible="False" />
                        <asp:Button class="button" ID="btnKhongDuyet" runat="server" Text="Không duyệt" OnClick="btnKhongDuyet_Click"
                            Visible="False" />
                        <asp:Button class="button" ID="btQuayLai" runat="server" Text="Quay lại" OnClick="btQuayLai_Click"
                            Visible="False" />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <%--        </ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
    <sbc:sbcMsgBox ID="sbcMsgBox4" runat="server" UseJQuery="True" />
</asp:Content>
